import { defineStore } from 'pinia'


export const useUserStore = defineStore('user', {
	state: () => {
		return {
			user: {nick:'',headerimg:'',_id:''},
		}
	},
	actions: {//保存user
		saveUser(user) {
			this.user = user
		},
	},
    getters:{//获取用户
        userInfo:(state)=>state.user//用户信息
    }
})
